
from weibo_api.user_api import get_user_info_api
from business.get_fans_id_list import get_fans_id_list
from business.get_user import get_user
from domain.UserInfo import UserInfo


def statistic(user_id):
    # 1.获取当前用户的基本信息
    user_info_json = get_user_info_api(user_id)
    user_info = UserInfo(**user_info_json)
    # 2.获取用户的粉丝id列表
    fans_id_list = get_fans_id_list(user_id)
    result = []
    # 3.获取各个粉丝的个人数据
    for fans_id in fans_id_list:
        user = get_user(fans_id)
        result.append(user.json())
    # 4.进行分析
    print(result)
    return 

    

